﻿namespace Digitalmes.WebApi.Infrastructure.Jwt;

/// <summary>
/// JWT Token 配置
/// </summary>
public sealed class JwtTokenConfig
{
    /// <summary>
    /// JWT 秘钥，长度至少是16位。
    /// </summary>
    [NotNull]
    public string? SecretKey { get; init; } = string.Empty;

    /// <summary>
    /// 签发人
    /// </summary>
    [NotNull]
    public string? Issuer { get; init; } = string.Empty;

    /// <summary>
    /// 受众
    /// </summary>
    [NotNull]
    public string? Audience { get; init; } = string.Empty;

    /// <summary>
    /// access_token 过期时间（分钟）
    /// </summary>
    public int AccessTokenExpiration { get; init; }

    /// <summary>
    /// refresh_token 过期时间（分钟）
    /// </summary>
    public int RefreshTokenExpiration { get; init; }
}
